package contexlib;

import java.util.*;
import java.io.*;

public class readFile {

    public static String readFromFile(String src) {
        try {
            BufferedReader bufferedReader = new BufferedReader(new FileReader(new File(src)));
            StringBuilder stringBuilder = new StringBuilder();
            String content;
            while((content = bufferedReader.readLine() )!=null){
                stringBuilder.append(content);
            }
            return stringBuilder.toString();
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            System.out.println("lalalalal");
            e.printStackTrace();
            return null;
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            return null;
        }

    }
}
